export default function Navbar ({items, clearItems}) {
    return (
        <nav className="navbar bg-dark px-1 py-3 border-bottom">
            <div className="container-fluid">
                <a 
                    className="navbar-brand text-white fs-4"
                    href="">今日事今日毕
                </a>
                {(items.length > 0) && (
                    <button
                        className="btn btn-outline-success rounded-0 text-white fs-5"
                        onClick={() => clearItems()}
                    >
                        清空
                    </button>
                )}
            </div>
        </nav>
    )
}